﻿using A.M.ETO;
using A.M.Storage.I_Application;
using L.M.System.Application.Services;
using L.M.System.Domain.DTO;
using L.M.System.Domain.Entity;
using L.M.System.Infrastruecure.Repository;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace L.M.System.Application.IServices
{
    public interface IRole_listServices: IBaseServices<role_list,string>
    {
        /// <summary>
        /// 角色显示
        /// </summary>
        /// <param name="pageSize">每页条数</param>
        /// <param name="pageIndex">当前页索引</param>
        /// <param name="rName">查询条件</param>
        /// <returns>角色显示</returns>
        Task<ApiReturn<PageETO<role_list>>> GteRoleInfor(int pageSize, int pageIndex, string? rName);

        /// <summary>
        /// 角色添加
        /// </summary>
        /// <param name="roleAdd">角色实体</param>
        /// <returns>角色</returns>
        Task<ApiReturn<string>> GetAddRoelInfor(RoleAddDTO roleAdd);

        /// <summary>
        /// 获取角色下面所有的人员
        /// </summary>
        /// <param name="pageSize">每页条数</param>
        /// <param name="pageIndex">当前页索引</param>
        /// <param name="tName">查询条件</param>
        /// <returns>统一返回格式</returns>
        Task<ApiReturn<PageETO<RoleInforEmpInforDTO>>> GetShowRoleTrue(int pageSize, int pageIndex, string? tName);

        /// <summary>
        /// (添加)修改 角色的状态 + 角色主权限添加 + 角色二级权限添加 + 角色按钮添加
        /// </summary>
        /// <param name="roleDTO">角色等权限DTO</param>
        /// <returns>统一返回格式</returns>
        Task<ApiReturn<string>> AddInforRole(AddInforRoleDTO roleDTO);

        /// <summary>
        /// 获取所有的用户 及 关联的角色
        /// </summary>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <param name="sName"></param>
        /// <returns></returns>
        Task<PageETO<Empinfor_roleDTO>> GetStaff_RoleInfor(int pageSize, int pageIndex, string? sName);

        /// <summary>
        /// 获取角色的备注
        /// </summary>
        /// <param name="rId"></param>
        /// <returns>summary</returns>
        ApiReturn<string> GetRoleInfor(string? rId);

        /// <summary>
        /// (修改)修改 角色的状态 + 角色主权限添加 + 角色二级权限添加 + 角色按钮添加
        /// </summary>
        /// <param name="roleDTO">角色等权限DTO</param>
        /// <returns>统一返回格式</returns>
        Task<ApiReturn<string>> UpdInforRole(AddInforRoleDTO roleDTO);

        /// <summary>
        /// 获取到登录用户的信息
        /// </summary>
        /// <param name="uId">用户编号</param>
        /// <returns>获取到登录用户的信息</returns>
        Task<ApiReturn<UserInforDTO>> GetShowStaaInfor(string? uId);

        /// <summary>
        /// 禁用不存在用户的角色
        /// </summary>
        /// <param name="rId">编号</param>
        /// <returns>统一返回格式</returns>
        Task<ApiReturn<string>> UpdStaty(string rId);

        /// <summary>
        /// 删除角色
        /// </summary>
        /// <param name="rId">编号</param>
        /// <returns>统一返回格式</returns>
        Task<ApiReturn<string>> DelInforRole(string? rId);


        /// <summary>
        /// 反填角色
        /// </summary>
        /// <param name="rId">编号</param>
        /// <returns>统一返回格式</returns>
        Task<ApiReturn<role_list>> FanInforRole(string rId);

        /// <summary>
        /// 修改角色用户
        /// </summary>
        /// <param name="roleUpd">角色</param>
        /// <returns>修改角色用户</returns>
        Task<ApiReturn<string>> GetUpdRoleInfor(RoleAddDTO roleUpd);
    }
}
